<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script>
            function newDoc() {
                window.location.assign("http://www.w3school.com.cn");
            }
        </script>
    </head>
    <body>
        <input type="button" value="加载新文档" onclick="newDoc()">
    </body>
</html>